package com.koron.sinoprobe.config;

import java.util.HashMap;
import java.util.Map;

/**
 * @author twcao
 * @title: Constants
 * @projectName GDH_EAM_V2
 * @description: 常量
 * @date 2021/9/618:14
 */
public class Constants {

    /**
     * 专项计划包前缀
     */
    public static final String SPP_PREFIX_CODE = "ZXJHB";

    /**
     * 专项计划前缀
     */
    public static final String SP_PREFIX_CODE = "ZXJH";

    /**
     * 专项项目前缀
     */
    public static final String SP_PROJECT_PREFIX_CODE = "ZXXM";

    /**
     * 项目变更
     */
    public static final String SP_PROJECT_BG_CODE = "BG";

    public static final class PackageStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审核
        public static final String WAIT_REVIEW = "WAIT_REVIEW";
        // 已审核
        public static final String APPROVED = "APPROVED";
    }

    public static final class PlanStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审核
        public static final String WAIT_REVIEW = "WAIT_REVIEW";
        // 已审核
        public static final String APPROVED = "APPROVED";
        // 已下发
        public static final String ISSUED = "ISSUED";
    }

    /**
     * 专项计划协作状态
     * 协作状态，指专项计划包和专项计划的工作流是否共用，若共用，由计划包状态同步至计划状态，字典：同步，异步
     */
    public static final class PlanAssistStatus {
        // 同步
        public static final String SYNC = "SYNC";
        // 异步
        public static final String ASYNC = "ASYNC";
    }

    /**
     * 项目办结状态
     */
    public static final class ConcludeStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审核
        public static final String WAIT_REVIEW = "WAIT_REVIEW";
        // 已办结
        public static final String FINISH = "FINISH";
    }

    /**
     * 项目信息变更状态: 草稿、已变更
     */
    public static final class ChangeInfoStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 已变更
        public static final String CHANGED = "CHANGED";
    }

    /**
     * 项目变更类型
     */
    public static final class ChangeType {
        // 基础信息变更
        public static final String PROJECT_CHANGE = "project_info_change";
        // 里程碑变更
        public static final String MEMORABILIA_CHANGE = "project_memorabilia_change";
    }

    /**
     * 里程碑变更：草稿、待审核、已审批
     */
    public static final class ChangeMemorabiliaStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审核
        public static final String WAIT_REVIEW = "WAIT_REVIEW";
        // 已审核
        public static final String APPROVED = "APPROVED";
    }

    public static final class ProjectStatus {
        // 规划中
        public static final String IN_PLAN = "IN_PLAN";
        // 进行中
        public static final String UNDERWAY = "UNDERWAY";
        // 已完成
        public static final String FINISH = "FINISH";

        // 待审核
        public static final String WAIT_REVIEW = "WAIT_REVIEW";

        // 终结
        public static final String END = "END";

        // 废弃
        public static final String ABANDON = "ABANDON";
    }

    public static final class AppceptStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审批
        public static final String WAIT_REVIEW = "WAIT_REVIEW";
        // 已审批
        public static final String APPROVED = "APPROVED";
        // 已完成
        public static final String FINISHED = "FINISHED";
    }

    public static final class MilestoneStatus {
        // 未开始
        public static final String NOT_START = "NOT_START";
        // 进行中
        public static final String ONGOING = "ONGOING";
        // 已结束
        public static final String FINISH = "FINISH";
        // 正常
        public static final String NORMAL = "NORMAL";
        // 滞后
        public static final String LAG = "LAG";
    }

    public static final class PlanSource {
        // 计划包生成
        public static final String PLAN_PACKAGE = "PLAN_PACKAGE";
        // 手工创建
        public static final String MANUALLY = "MANUALLY";
    }

    public static final class ProjectType {
        // 工程类
        public static final String PROJECT = "project";
        // 采购类
        public static final String PURCHASE = "purchase";
        // 其他类
        public static final String OTHER = "other";

        public static final Map<String, String> prefixMap = new HashMap<>();

        static {
            prefixMap.put(PROJECT, "GCXM");
            prefixMap.put(PURCHASE, "CGXM");
            prefixMap.put(OTHER, "QTXM");
        }
    }

    /**
     * 工作流参数
     */
    public static final class SP_PACKAGE_WORKFLOW {

        public static final String APP_CODE = "gdheam";

        public static final String SET_CODE = "sinoprobe";

        public static final String PROCESS_CODE = "sp_plan_package";
    }

    /**
     * 工作流参数
     */
    public static final class SP_PLAN_WORKFLOW {

        public static final String APP_CODE = "gdheam";

        public static final String SET_CODE = "sinoprobe";

        public static final String PROCESS_CODE = "sp_plan_approval";
    }

    public static final class SP_WORKFLOW {

        // 项目立项
        public static final String ESTABLISH = "sp_establish";

        // 项目设计
        public static final String DESIGN = "sp_design";

        // 预算审查
        public static final String BUDGETREVIEW = "sp_budgetReview";

        // 项目划分
        public static final String DIVISION = "sp_division";

        // 施工方案
        public static final String CONSTRUCTION_PLAN = "sp_constructionPlan";

        // 项目验收
        public static final String APPCEPT = "sp_appcept";

        // 项目后评价
        public static final String END_APPRAISE = "sp_endAppraise";

        // 结算审查
        public static final String SETTLEMENT_AUDIT = "sp_settlementAudit";

        // 采购立项
        public static final String PURCHASE_ESTABLISH = "sp_purchase_establish";

        // 采购到货验收
        public static final String PURCHASE_ACCEPT = "sp_purchase_accept";
    }

    /**
     * 专项工程操作类型
     */
    public static final class SP_PROJECT_ACTION {

        // 项目立项
        public static final String ESTABLISH = "establish";

        // 项目设计
        public static final String DESIGN = "design";

        // 项目划分
        public static final String DIVISION = "division";

        // 预算审查
        public static final String BUDGETREVIEW = "budgetReview";

        // 项目实施
        public static final String CONSTRUCTION = "construction";

        // 项目验收
        public static final String APPCEPT = "appcept";

        // 结算审查
        public static final String SETTLEMENT_AUDIT = "settlementAudit";

        // 质保期满验收
        public static final String WARRANTY_ACCEPT = "warrantyAccept";

        // 项目后评价
        public static final String END_APPRAISE = "endAppraise";

        // 采购立项
        public static final String PURCHASE_ESTABLISH = "purchaseEstablish";

        // 采购到货验收
        public static final String PURCHASE_ACCEPT = "purchaseAccept";

    }

    public static final class SP_PROJECT_DIVISION_TYPE{
        public static final String PROJECT = "project";
        public static final String SEGMENT = "segment";
        public static final String CELL = "cell";
    }

    public static final class SubPackageStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审核
        public static final String WAIT_REVIEW = "WAIT_REVIEW";
        // 已审核
        public static final String APPROVED = "APPROVED";
    }
}
